<template>
  <div>
    <CategoryHeadVue them="收藏夹"></CategoryHeadVue>
    <main>
      <van-card
        :price="colgoods.originprice"
        :title="colgoods.proname"
        :thumb="colgoods.img1"
        v-for="colgoods in collectgoods"
        :key="colgoods.proid"
      >
      </van-card>
    </main>
  </div>
</template>
 
 <script>
import CategoryHeadVue from "@/components/Category-head.vue";
export default {
  name: "collect",
  data() {
    return {
      collectgoods: [],
    };
  },
  components: {
    CategoryHeadVue,
  },
  created() {
    //取出存储在vuex中的数据
    this.collectgoods = this.$store.state.collectdata;
    console.log("this.collectgoods: ", this.collectgoods);
  },
};
</script>
 
 <style>
</style>